﻿/*  ----------------------------------------------------------------------------
 *  EuphoricNation
 *  ----------------------------------------------------------------------------
 *  EuphoricEngine v1.0
 *  ----------------------------------------------------------------------------
 *  File:       ClearScreen.cs
 *  Author:     Shane-PC\Shane
 *  ----------------------------------------------------------------------------
 */

using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace EuphoricEngine.Components
{
    public class ClearScreen : Component
    {
        private Color _color;

        public ClearScreen(Color color)
            : base()
        {
            _color = color;
        }

        public ClearScreen(Color color, int drawOrder)
            : base()
        {
            _color = color;
            DrawOrder = drawOrder;
        }

        public void SetColor(Color color)
        {
            _color = color;
        }

        public override void Draw()
        {
            Parent.Engine.GraphicsDevice.Clear(_color);
        }
    }
}
